<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/7/30
 * Time: 11:56
 */
    require_once('../OrdinaryFee/OrdinaryFee.php');
    require_once('../Common.php');
    require_once ('PDFCreator.php');
    $appID = $_REQUEST['approval_id'];

    $return_array = array();
    $o_fee = new OrdinaryFee();
    $r = $o_fee->getOrdinaryFeeDetailByID($appID);
    if($r){
        $pdf = new PDFCreator();
        $url = $pdf->createOrdinaryFeeApprovePDF($r);
        $result_array['state'] = 1;
        $result_array['state_error'] = '';
        $result_array['url'] = $url;
    }
    else{
        $result_array['state'] = 0;
        $result_array['state_error'] = 'DB_ERROR';
    }

    echo json_encode($result_array);



?>